<template>
    <div id='wrap'>
        <h1>v-show & v-if</h1>
        <p class="pnav" v-if="isShow">
            我是第一个p标签
        </p>
        <p class="pamin" v-show="isShow">
            我是第二个p标签
        </p>
        <button type="button" @click="toggleShow">控制显示与隐藏</button>
    </div>
</template>
<script lang='ts'>
export default {
    name: 'studemo11',
}
</script>
<script lang='ts' setup>
import { ref } from 'vue';
import { h } from 'vue';
const isShow = ref(true);
function toggleShow() {
    isShow.value = !isShow.value;
}
</script>
<style lang='scss'>
@use '@/assets/common.scss';
</style>